package Middleware;

import java.io.Serializable;

public class Card implements ICard, Serializable {
	private static final long serialVersionUID = -2279411207579657013L;
	private char value;
	private char color;
	
	public Card(String name) {
		value = Character.toUpperCase(name.charAt(0));
		color = Character.toUpperCase(name.charAt(1));
	}
	
	public Card(char value, char color) {
		this.value = Character.toUpperCase(value);
		this.color = Character.toUpperCase(color);
	}
	
	public String getName() {
		return "" + value + color;
	}
	
	public char getValue() {
		return value;
	}
	
	public char getColor() {
		return color;
	}
}
